package com.ruoyi.wms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wms.mapper.WmsOutCheckItemMapper;
import com.ruoyi.wms.domain.WmsOutCheckItem;
import com.ruoyi.wms.service.IWmsOutCheckItemService;
import com.ruoyi.common.core.text.Convert;

/**
 * 出库明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-02-15
 */
@Service
public class WmsOutCheckItemServiceImpl implements IWmsOutCheckItemService 
{
    @Autowired
    private WmsOutCheckItemMapper wmsOutCheckItemMapper;

    /**
     * 查询出库明细
     * 
     * @param id 出库明细主键
     * @return 出库明细
     */
    @Override
    public WmsOutCheckItem selectWmsOutCheckItemById(Long id)
    {
        return wmsOutCheckItemMapper.selectWmsOutCheckItemById(id);
    }

    /**
     * 查询出库明细列表
     * 
     * @param wmsOutCheckItem 出库明细
     * @return 出库明细
     */
    @Override
    public List<WmsOutCheckItem> selectWmsOutCheckItemList(WmsOutCheckItem wmsOutCheckItem)
    {
        return wmsOutCheckItemMapper.selectWmsOutCheckItemList(wmsOutCheckItem);
    }

    /**
     * 新增出库明细
     * 
     * @param wmsOutCheckItem 出库明细
     * @return 结果
     */
    @Override
    public int insertWmsOutCheckItem(WmsOutCheckItem wmsOutCheckItem)
    {
        wmsOutCheckItem.setCreateTime(DateUtils.getNowDate());
        return wmsOutCheckItemMapper.insertWmsOutCheckItem(wmsOutCheckItem);
    }

    /**
     * 修改出库明细
     * 
     * @param wmsOutCheckItem 出库明细
     * @return 结果
     */
    @Override
    public int updateWmsOutCheckItem(WmsOutCheckItem wmsOutCheckItem)
    {
        wmsOutCheckItem.setUpdateTime(DateUtils.getNowDate());
        return wmsOutCheckItemMapper.updateWmsOutCheckItem(wmsOutCheckItem);
    }

    /**
     * 批量删除出库明细
     * 
     * @param ids 需要删除的出库明细主键
     * @return 结果
     */
    @Override
    public int deleteWmsOutCheckItemByIds(String ids)
    {
        return wmsOutCheckItemMapper.deleteWmsOutCheckItemByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除出库明细信息
     * 
     * @param id 出库明细主键
     * @return 结果
     */
    @Override
    public int deleteWmsOutCheckItemById(Long id)
    {
        return wmsOutCheckItemMapper.deleteWmsOutCheckItemById(id);
    }
}
